package com.shadow.web;

import com.shadow.message.OutBindingClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MQController {
    @Autowired
    OutBindingClient outBindingClient;
    @GetMapping("/sendMsg")
    public void sendMsg(){
        outBindingClient.output().send(MessageBuilder.withPayload("子路好帅").build());
    }
}
